home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / c / pcw.zip / PCW_QREF.TXT < prev    next >
Text File  |  1991-11-28  |  9KB  |  196 lines

  1. /* pcw_qref.txt
  2.    pcwindows v1.1
  3.    quick reference
  4.    28nov91 cb
  5. */
  6.  
  7. /* === menu.h ======================================================== */
  8. typedef struct menu_wnd {                /* Basic Window Definition */
  9.        WNDPTR *wnd;                          /* initial Window Pointer */
  10.        int    urow,ucol,lrow,lcol;                /* Window Boundaries */
  11.        int    fcolor,bcolor;                           /* Window color */
  12.        int    btype, bfclr,bbclr;             /* Border Type and Color */
  13.        char   *title;                                    /* Menu Title */
  14.        int    tvloc, thloc, tfclr, tbclr;       /* Title Loc and Color */
  15.        int    cfclr, cbclr;                        /* Choice Bar Color */
  16. }MENU_WND;
  17.  
  18.  
  19. typedef struct p_menu_list {    /* Definition of Pmenu Option Field */
  20.        char select_key;                       /* Select Key for Option */
  21.        char *item;                     /* String Description of Option */
  22. }PMNUFLDS;
  23. typedef struct {                /* Definition of Pmenu */
  24.        MENU_WND    pwnd;                    /* Pointer to Basic Window */
  25.        int         bar_pos;                 /* Initial Choice Position */
  26.        PMNUFLDS    *plist;                  /* Pointer to Option Array */
  27. }PMNUTYPE;
  28. WNDPTR *makepmenu(PMNUTYPE *menu);
  29. char   pmenuinput(PMNUTYPE *menu);
  30.  
  31.  
  32. typedef struct {                /* Definition of Lmenu Option Field */
  33.        char select_key;                    /* Select Key for Option */
  34.        int  select_col;               /* column of Menu Option Text */
  35.        char *item;                              /* Menu Option Text */
  36.        char *item_msg;                /* Text Description of Option */
  37. }LMNUFLDS;
  38. typedef struct l_menu_type {   /* Definition of Lmenu */
  39.        MENU_WND    lwnd;               /* Pointer to Basic Windoe\w */
  40.        int         bar_pos, wnd_pos;  /* initial Bar and Window Pos */
  41.        LMNUFLDS    **llist;        /* Pointer to pointer to Options */
  42. }LMNUTYPE;
  43. WNDPTR *makelmenu(LMNUTYPE *menu);
  44. char   lmenuinput(LMNUTYPE *menu);
  45.  
  46.  
  47. typedef struct pick_list {     /* Definition of Picklist */
  48.        MENU_WND    plwnd;                /* Pointer to Basic Window */
  49.        char        **list;         /* Pointer to Pointer to Options */      
  50.        int         bar_pos, off;      /* initial Bar and Window Pos */
  51. }PICKLIST;
  52. WNDPTR *make_pick_list(PICKLIST *menu);
  53. int    get_pick_list(PICKLIST *menu);
  54.  
  55.  
  56. typedef struct {            /* Definition of Tmenu Option Fields */
  57.         char select_key;                              /* Select Key */
  58.         int  select_col;              /* Column of Menu Option Text */
  59.         char *item;                             /* Menu Option Text */
  60. }TMNUFLDS;
  61. typedef struct t_menu_type {  /* Definition of Tmenu */
  62.         MENU_WND  twnd;                  /* Pointer to Basic Window */
  63.         int       bar_pos, wnd_pos;   /* Initial Bar and Window Pos */
  64.         TMNUFLDS  **tlist;         /* Pointer to Pointer to Options */
  65. }TMNUTYPE;
  66. WNDPTR *maketmenu(TMNUTYPE *menu);
  67. char   tmenuinput(TMNUTYPE *menu);
  68.  
  69.  
  70. /* === pcwproto.h =====================================  */
  71.  
  72. /* Environment functions */
  73. void   pcwinit(int action); [AUTOEXIT|NOEXIT]        /* init library */
  74. int    ispcwinit(void);                /* Is the library intialized? */
  75. int    chk_video_state(int *rw, int *cl); /* Returns max rows & cols */
  76. int    getpage(void);                       /* Gets logical CRT page */
  77. int    getpagesize(void);                /* Returns size of CRT page */
  78. int    setpage(int page);                   /* Sets logical CRT page */
  79. unsigned int getscrnseg(void);       /* Returns Segment of video mem */
  80.  
  81. /*     Window Functions    */
  82. WNDPTR *wexplode(int urow,int ucol,int lrow,int lcol,int fclr,int bclr);
  83. WNDPTR *wframe(int ur,int uc,int lr,int lc, int fclr, int bclr);
  84. WNDPTR *get_active_wnd(void);
  85. WNDPTR *wpush(int urow, int ucol, int lrow, int lcol);
  86. WNDPTR *wpop(WNDPTR *wnd);
  87. int    whide(WNDPTR *wnd);
  88. int    wshow(WNDPTR *wnd);
  89. int    wndmove(WNDPTR *wnd, int row, int col);
  90.  
  91. int    wputs(WNDPTR *wnd, int row, int col, char str[]); [col=col|CENTER]
  92. int    wprintf(WNDPTR *wnd, int row, int col, char *format,...);
  93. int    wprints(WNDPTR *wnd,int row,int col,int fclr,int bclr,char *str);
  94. int    w_block_write(WNDPTR *wnd, int row, int col, char *block[]);
  95. int    wtitle(WNDPTR *wnd, int tb, int mlr, char *s);
  96.             tb = [TOP | BOTTOM],  mlr = [MIDDLE | LEFT | RITE]
  97. int    wscroll(WNDPTR *wnd, int action, int count);
  98. int    clr_wnd(WNDPTR *wnd, int action);
  99.  
  100. /* Some Miscellaneous Function related to quick writes & windows */
  101. void   titlecolor(int fcolor, int bcolor);
  102. void   bordercolor(int fcolor, int bcolor);
  103. void   setborder(int type);
  104.        [DOUBLEALL | SINGLEALL | SINGLESIDES | DOUBLESIDES | NOSIDES]
  105. void   set_wnd_attr(WNDPTR *wnd, int foreground, int background);
  106. int    w_chg_attr(WNDPTR *wnd,int row,int col,
  107.                   int fclr,int blclr,int cols);
  108.  
  109. /*     Quick Screen Writing Routines     */
  110. int    qputchar(int row, int col, int fcolor, int bcolor, char ch);
  111. int    qfill(int urow,int ucol,int lrow,int lcol,
  112.              int fcolor,int bcolor,int ch); [ch = SPACES = ' ']
  113. int    qbox(int urow, int ucol, int lrow, int lcol);
  114. int    qvchar(int row,int col,int fcolor,int bcolor,char ch,int count);
  115. int    qhchar(int row,int col,int fcolor,int bcolor,char ch,int count);
  116. int    qputs (int row, int col, int fcolor, int bcolor, char *s);
  117.                      [col = col | CENTER]
  118. int    qvputs(int row, int col, int fcolor, int bcolor, char *s);
  119. int    qprintf(int row,int col,int fcolor,int bcolor,char *format, ...);
  120. int    qvprintf(int row,int col,int fcolor,int bcolor,char *format, ...);
  121. int    q_block_write(int row,int col,int fclr,int bclr, char *block[]);
  122. int    scroll(int ur,int uc,int lr,int lc,int fg,int bg,int count);
  123. int    chg_attr(int row, int col, int fcolor, int bcolor, int count);
  124. int    getattr(int row, int col);
  125. int    getchr(int row, int col);
  126.  
  127. /* Miscellaneous Functions */
  128. void   _sound(unsigned freq);
  129. void   _nosound(void);
  130. void   rest(unsigned ticks);
  131. void   swait(unsigned seconds);
  132. void far _delay(unsigned ms);
  133. void   farcopy(void far *dest, void far *srce, unsigned count);
  134.  
  135. /* BIOS dependent functions */
  136. int    vgetattr(void);
  137. int    vgetchr(void);
  138. void   get_cursor_size(int *tline, int *bline);
  139. void   set_cursor_size(int tline, int bline);
  140. void   get_cursor_pos(int *row, int *col);
  141. void   set_cursor_pos(int row, int col);
  142. void   switchpage(int page);
  143. void   vcls(void);
  144. void   vgetmode(int *cols, int *mode, int *activepage);
  145. void   vsetmode(int mode);
  146.  
  147. /*  Mouse Functions  */
  148. int    init_mouse(void);
  149. int    get_mpressed(int button);     LEFTM  /* Left Mouse Button */
  150. int    get_mreleased(int button);    RITEM  /* Rite Mouse Button */
  151. void   show_mouse(void);
  152. void   hide_mouse(void);
  153. void   get_mpos(int *row, int *col, int *bstatus);
  154. void   set_mpos(int  row, int  col);
  155. void   mframe(int urow, int ucol, int lrow, int lcol);
  156. void   set_mtype(int ctype, int arg1, int arg2);
  157. char   *save_mouse_state(void);
  158. void   restore_mouse_state(char *buffer);
  159.  
  160. /* Keyboard Functions */
  161. int    keypressed(void);                        /* Was a key pressed */
  162. int    readkey(void);                     /* Read keyboard character */
  163. int    isxkeybd(void);                    /* Extended keyboard BIOS? */
  164. int    keywait(int seconds);                   /* Wait or keypressed */
  165. int    get_chars(int rw,int cl,int fc,int bc,int len,char *buffer);
  166. char   keyin(void);                   /* Read char/handles spcl keys */
  167. void   keybrd_flush(void);                     /* Flush the keyboard */
  168.  
  169. /*  EGA/VGA specific functions */
  170. int    download_rom_font(int font, char *buffer);
  171. int    load_user_font(int bpc,int blk,int nchars,int fchar,char *buffer);
  172. char   *get_ega_palette(int mode);
  173. void   set_palette(int preg, int color);
  174. void   load_ega_palette(void);
  175. void   set_load_palette(int preg, int color);
  176. void   fload(int block, int font);
  177. void   set_vga_scan_lines(int arg);
  178.  
  179. /* Interrupt Handlers & Such */
  180. int    set_int24(void);
  181. int    set_int29(void);
  182. void   reset_int29(void);
  183.  
  184. /*  Defined Text Colors  */
  185.    BLACK, BLUE, GREEN, CYAN
  186.    RED, MAGENTA, BROWN, LIGHTGRAY
  187.    DARKGRAY, LIGHTBLUE, LIGHTGREEN, LIGHTCYAN
  188.    LIGHTRED, LIGHTMAGENTA, YELLOW, WHITE
  189.    BLINK
  190.  
  191. /*  Defined Keys  */
  192.    CR, ESC, F1..F10, SHFTF1..10, CTRLF1..F10, ALTF1..F10 
  193.    BACKSPACE, TAB, SHFTTAB, HOME, UPARROW, PGUP, LEFTARROW
  194.    RITEARROW, END, DOWNARROW, PGDN, INS, DEL
  195.  
  196.